home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14466 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: symiserver2.symantec.com!usenet
  2. From: Kostya Vasilyev <kostya@scruznet.com>
  3. Newsgroups: comp.lang.smalltalk,comp.object,comp.lang.c++,comp.lang.java
  4. Subject: Re: The Good, the Bad, the Ugly, and the Wicked ...
  5. Date: Fri, 29 Mar 1996 08:36:11 -0800
  6. Organization: Dreaded Neurological Army (DNA)
  7. Message-ID: <315C117B.EF0@scruznet.com>
  8. References: <31570B8E.5A12@vmark.com> <31586721.1750@mobius.net> <4jbk0m$jt9@news4.digex.net> <AD7EDB45966858C12@mac-sandvik.engr.sgi.com>
  9. NNTP-Posting-Host: 155.64.35.90
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win95; I)
  14.  
  15. Kent Sandvik wrote:
  16. > In article <4jbk0m$jt9@news4.digex.net>,
  17. > ell@access1.digex.net (Ell) wrote:
  18. >   >C++ very much has dynamic binding; lookup virtual functions.
  19. > It depends how you defined dynamic binding, could you send messages to
  20. > arbitrary methods in C++ during runtime (or java, by the way)?
  21. > --Kent
  22.  
  23. It's not "call by name" but in C++ you can use functors implemented with the help of 
  24. templates.  That does not have the restriction that that the client (the object being called 
  25. back) be derived from a specific interface or class.
  26.  
  27. In Java, on the other hand, the only way of doing this is to require that all objects that 
  28. you want to call implement a particular interface -- but that may be inconvenient or 
  29. restrictive in some cases.  Of course, there is sysExt, but it's beauty nonwithstanding, 
  30. this is still a hack and I'm not even sure if applets are allows to do this???
  31.  
  32. -- Kostya V.
  33.